import { ref } from 'vue'
import { defineStore } from 'pinia'

import { deviceHandler } from '@/utils/util'

type DeviceType = 'ios' | 'android' | ''

export const useAppStore = defineStore(
  'app',
  () => {
    const device = ref<DeviceType>(deviceHandler())

    const navHeight = ref(0)

    return { device, navHeight }
  },
  { persist: true }
)
